package com.xky.email.service.controller;

import com.xky.email.service.Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author keying.xia
 * @date 2017/12/8
 */
@RestController
public class Controller {

    @Autowired
    private Service service;

    @GetMapping(value = "/send")
    public void send(){
        service.sendEmail();
    }

    @GetMapping(value = "/send1")
    public void send1(){
        try {
            service.sendEmail1();
        }catch (Exception e){
            e.printStackTrace();
        }
    }

    @GetMapping(value = "/send2")
    public void send2(){
        try {
            service.sendEmail2();
        }catch (Exception e){
            e.printStackTrace();
        }
    }


}
